<template>
  <div style="width: 100%; height: calc(100% - 50px); overflow-y: auto">
    <!--下拉框-->
    <div style="position: absolutel; margin-left: 20px">
      <span style="font-size: 18px">选择样例：</span>
      <el-select v-model="value" placeholder="请选择">
        <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
        </el-option>
      </el-select>
    </div>
    <!-- 图表 -->
    <div style="margin-top: 10px">
      <!--折线图-->
      <el-card class="box-card">
        1
        <echarts-line :option='lineOpt' type='line' style="width: 100%; height: 100%"></echarts-line>

      </el-card>
      <!--柱状图-->
      <el-card class="box-card">
        2
        <barEcharts :option='lineOpt' style="width: 100%; height: 100%"></barEcharts>
      </el-card>

      <el-card class="box-card">3</el-card>
      <el-card class="box-card">4</el-card>
      <el-card class="box-card">5</el-card>
      <el-card class="box-card">6</el-card>
    </div>


  </div>
</template>
<script>
import barEcharts from "@/components/echarts/barEcharts";
export default {
  components: {
    barEcharts
  },
  data() {
    return {
      options: [
        {value: '1', label: '样例1'},
        {value: '2', label: '样例2'}
      ],
      value: '',
      lineOpt: {
        xAxis: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
        series: [150, 230, 224, 218, 135, 147, 260]
      },

    }
  }
}
</script>
<style lang="scss" scoped>
::v-deep .el-card__body {
  height: 100%;
}

.box-card {
  display: inline-block;
  width: 510px;
  height: 350px;
  margin: 15px 20px;
}

</style>
